package drMadLap.android.talkyourday;

import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.content.Context;


public class DailyViewItem extends LinearLayout
{
	private TextView DayText;
	private TextView WeatherText;
	
	private TextView IssueText1;
	private TextView IssueText2;
	private TextView IssueText3;
	
	private TextView ContentText1;
	private TextView ContentText2;
	private TextView ContentText3;
	
	public DailyViewItem(Context context) 
	{
		super(context);
		// TODO Auto-generated constructor stub
		String infService = Context.LAYOUT_INFLATER_SERVICE;
		LayoutInflater li;
		li = (LayoutInflater)getContext().getSystemService(infService);
		li.inflate(R.layout.dailyitem, this, true);
		
		DayText = (TextView)findViewById(R.id.textView_Day);
		WeatherText = (TextView)findViewById(R.id.textView_Weather);
		
		IssueText1 = (TextView)findViewById(R.id.textViewDailyItemIssue1);
		IssueText2 = (TextView)findViewById(R.id.textViewDailyItemIssue2);
		IssueText3 = (TextView)findViewById(R.id.textViewDailyItemIssue3);
		
		ContentText1 = (TextView)findViewById(R.id.textViewDailyItemContent1);
		ContentText2 = (TextView)findViewById(R.id.textViewDailyItemContent2);
		ContentText3 = (TextView)findViewById(R.id.textViewDailyItemContent3);
	}
	
	public DailyViewItem(Context context, AttributeSet attrs){
		super(context, attrs);
	}
	
	public void SetContent(
			String DateTimeRecord,
			String WeatherRecord,
			String Issue0,
			String Answer0,
			String Issue1,
			String Answer1,
			String Issue2,
			String Answer2)
	{
		DayText.setText(DateTimeRecord);
		WeatherText.setText(WeatherRecord);
		IssueText1.setText(Issue0);
		ContentText1.setText(Answer0);
		IssueText2.setText(Issue1);
		ContentText2.setText(Answer1);
		IssueText3.setText(Issue2);
		ContentText3.setText(Answer2);
	}

}
